//1523. 在区间范围内统计奇数数目
// 思路：以左右数字 + 范围存在的奇数个数分情况讨论即可

class Solution 
{
public:
    int countOdds(int low, int high) 
    {
        if(low % 2 == 1 && high % 2 == 1) return (high - low) / 2 + 1;
        else if ((low % 2 == 1 && high % 2 == 0)
            || (low % 2 == 0 && high % 2 == 1)) return (high - low) / 2 + 1;
        else return (high - low) / 2;
    }
};